version: '2'

services:
#  cloud:
#    build: .
#    container_name: app-container
#    ports:
#        - "8080:8080"
#    environment:
#      - spring.datasource.url=jdbc:postgresql://mypostgres:5432/postgres
#    networks:
#      - cloud-net
#    depends_on:
#      - mypostgres

  mypostgres:
    container_name: db-container
    image: postgres:16
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: root
      POSTGRES_DB: cloud_pg
    volumes:
      - ./postgres_data:/var/lib/postgresql/data/
    ports:
      - "5433:5432"
    networks:
      - cloud-net

networks:
  cloud-net: {}